function checkvarname(varname)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CHECK THE PARAMETER NAME FOR EXISTENCE
%
% INPUT: - varname : parameter name as in AWQ_parameters.xls  
%        
% Author: Benedicte Pasquer, IMOS/eMII (http://imos.org.au/)
% email: benedicte.pasquer@utas.edu.au
% May 2013   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
currentdir = pwd ;
field_head = importdata(fullfile(currentdir,'AWQ_Parameter.xls'));

if ~any(strcmp(varname,field_head(:,2)))
    error('Unknown parameter. Available parameters are listed in AWQ_Parameter.xls')
end
